<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>Android二维码扫描——BGAQRCode-Android | 海晨忆的博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  
  
  <meta name="description" content="&amp;emsp;&amp;emsp;做过二维码扫描的童鞋都知道，要用Zxing，可是google官方推的Zxing，我们集成扫描的时候很慢，有时候就直接扫不出来，体验太差了。因为他适配了太多东西，我们只要一个扫描功能，然后就去网上搜索，怎么使zxing扫描变的很快，zxing的优化，然后跟着网上的博客，一步一步走，即使最终做完了，感觉体验还是不够好。我这里推荐一个二维码扫描的开源框架——BGAQRCode-A">
<meta property="og:type" content="article">
<meta property="og:title" content="Android二维码扫描——BGAQRCode-Android">
<meta property="og:url" content="https://haichenyi.com/2018/03/05/Android二维码扫描——BGAQRCode-Android/index.html">
<meta property="og:site_name" content="海晨忆的博客">
<meta property="og:description" content="&amp;emsp;&amp;emsp;做过二维码扫描的童鞋都知道，要用Zxing，可是google官方推的Zxing，我们集成扫描的时候很慢，有时候就直接扫不出来，体验太差了。因为他适配了太多东西，我们只要一个扫描功能，然后就去网上搜索，怎么使zxing扫描变的很快，zxing的优化，然后跟着网上的博客，一步一步走，即使最终做完了，感觉体验还是不够好。我这里推荐一个二维码扫描的开源框架——BGAQRCode-A">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-03-06T12:58:53.565Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Android二维码扫描——BGAQRCode-Android">
<meta name="twitter:description" content="&amp;emsp;&amp;emsp;做过二维码扫描的童鞋都知道，要用Zxing，可是google官方推的Zxing，我们集成扫描的时候很慢，有时候就直接扫不出来，体验太差了。因为他适配了太多东西，我们只要一个扫描功能，然后就去网上搜索，怎么使zxing扫描变的很快，zxing的优化，然后跟着网上的博客，一步一步走，即使最终做完了，感觉体验还是不够好。我这里推荐一个二维码扫描的开源框架——BGAQRCode-A">
  
    <link rel="alternate" href="/atom.xml" title="海晨忆的博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/uploads/artistic_image/head.jpg">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/css/highlight.css">
  <script>
  let antiquityStorage = window.sessionStorage.getItem('antiquitySessionStorage');
  if (antiquityStorage == '' || antiquityStorage == null) {
    var antiquityLoader = '<div id="loaderbox"><div class="loader"><div class="load-roll"><div class="load-top"></div><div class="load-right"></div><div class="load-bottom"></div></div></div></div>';
    document.write(antiquityLoader);
    document.body.style.overflow = 'hidden'
  }
  </script>
</head>

<body>
  <div id="fullpage" class="mobile-nav-right">
    
      <div id="wrapper" style="background-image: url(/uploads/artistic_image/bg.jpg)" title="背景图片来自网络">
    
    
      <header id="header">
  <div id="nav-toggle" class="nav-toggle"></div>
  <div class="head-box global-width">
    <nav class="nav-box nav-right">
      
        <a class="nav-item" href="/" title
        
        >首页</a>
      
        <a class="nav-item" href="/archives" title
        
        >归档</a>
      
        <a class="nav-item" href="/about" title
        
        >简历</a>
      
    </nav>
  </div>
</header>
      <div id="middlecontent" title class="global-width sidebar-left">
        <section id="main"><article id="post-Android二维码扫描——BGAQRCode-Android" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 class="article-title" itemprop="name">
      Android二维码扫描——BGAQRCode-Android
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2018/03/05/Android二维码扫描——BGAQRCode-Android/" class="article-date">
  <time datetime="2018-03-05T12:14:02.000Z" itemprop="datePublished">2018-03-05</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Android-常用功能/">Android -常用功能</a>
  </div>

    
  </div>
  
    <span id="busuanzi_container_page_pv">
      本文总阅读量<span id="busuanzi_value_page_pv"></span>次
    </span>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <p>&emsp;&emsp;做过二维码扫描的童鞋都知道，要用Zxing，可是google官方推的Zxing，我们集成扫描的时候很慢，有时候就直接扫不出来，体验太差了。因为他适配了太多东西，我们只要一个扫描功能，然后就去网上搜索，怎么使zxing扫描变的很快，zxing的优化，然后跟着网上的博客，一步一步走，即使最终做完了，感觉体验还是不够好。我这里推荐一个二维码扫描的开源框架——<a href="https://github.com/bingoogolapple/BGAQRCode-Android" target="_blank" rel="noopener">BGAQRCode-Android</a></p>
<a id="more"></a>
<p>&emsp;&emsp;QRCode 扫描二维码、扫描条形码、相册获取图片后识别、生成带 Logo 二维码、支持微博微信、QQ 二维码扫描样式。他把Zbar和Zxing，都做了优化，扫描速度非常快，用户体验很好，用起来也非常方便</p>
<h3 id="依赖"><a href="#依赖" class="headerlink" title="依赖"></a>依赖</h3><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">implementation &apos;cn.bingoogolapple:bga-qrcode-zbar:1.2.1&apos;</span><br><span class="line">或者</span><br><span class="line">implementation &apos;cn.bingoogolapple:bga-qrcode-zxing:1.2.1&apos;</span><br></pre></td></tr></table></figure></div>
<h3 id="用法"><a href="#用法" class="headerlink" title="用法"></a>用法</h3><p>以Zbar为例（Zxing类似）</p>
<h4 id="第一步：XML文件"><a href="#第一步：XML文件" class="headerlink" title="第一步：XML文件"></a>第一步：XML文件</h4><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">&lt;cn.bingoogolapple.qrcode.zbar.ZBarView</span><br><span class="line">        android:id=&quot;@+id/zbarview&quot;</span><br><span class="line">        style=&quot;@style/MatchMatch&quot;</span><br><span class="line">        app:qrcv_animTime=&quot;1000&quot;</span><br><span class="line">        app:qrcv_borderColor=&quot;@android:color/white&quot;</span><br><span class="line">        app:qrcv_borderSize=&quot;1dp&quot;</span><br><span class="line">        app:qrcv_cornerColor=&quot;@color/colorPrimaryDark&quot;</span><br><span class="line">        app:qrcv_cornerLength=&quot;20dp&quot;</span><br><span class="line">        app:qrcv_cornerSize=&quot;3dp&quot;</span><br><span class="line">        app:qrcv_isShowDefaultScanLineDrawable=&quot;true&quot;</span><br><span class="line">        app:qrcv_maskColor=&quot;#33FFFFFF&quot;</span><br><span class="line">        app:qrcv_rectWidth=&quot;200dp&quot;</span><br><span class="line">        app:qrcv_scanLineColor=&quot;@color/colorPrimaryDark&quot;</span><br><span class="line">        app:qrcv_topOffset=&quot;90dp&quot; /&gt;</span><br></pre></td></tr></table></figure></div>
<p><strong><em>自定义属性说明</em></strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">属性名</th>
<th style="text-align:center">说明</th>
<th style="text-align:center">默认值</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">qrcv_topOffset</td>
<td style="text-align:center">扫描框距离 toolbar 底部的距离</td>
<td style="text-align:center">90dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_cornerSize</td>
<td style="text-align:center">扫描框边角线的宽度</td>
<td style="text-align:center">3dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_cornerLength</td>
<td style="text-align:center">扫描框边角线的长度</td>
<td style="text-align:center">20dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_cornerColor</td>
<td style="text-align:center">扫描框边角线的颜色</td>
<td style="text-align:center">@android:color/white</td>
</tr>
<tr>
<td style="text-align:center">qrcv_rectWidth</td>
<td style="text-align:center">扫描框的宽度</td>
<td style="text-align:center">200dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_barcodeRectHeight</td>
<td style="text-align:center">条码扫样式描框的高度</td>
<td style="text-align:center">140dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_maskColor</td>
<td style="text-align:center">除去扫描框，其余部分阴影颜色</td>
<td style="text-align:center">#33FFFFFF</td>
</tr>
<tr>
<td style="text-align:center">qrcv_scanLineSize</td>
<td style="text-align:center">扫描线的宽度</td>
<td style="text-align:center">1dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_scanLineColor</td>
<td style="text-align:center">扫描线的颜色「扫描线和默认的扫描线图片的颜色」</td>
<td style="text-align:center">@android:color/white</td>
</tr>
<tr>
<td style="text-align:center">qrcv_scanLineMargin</td>
<td style="text-align:center">扫描线距离上下或者左右边框的间距</td>
<td style="text-align:center">0dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isShowDefaultScanLineDrawable</td>
<td style="text-align:center">是否显示默认的图片扫描线「设置该属性后 qrcv_scanLineSize 将失效，可以通过 qrcv_scanLineColor 设置扫描线的颜色，避免让你公司的UI单独给你出特定颜色的扫描线图片」</td>
<td style="text-align:center">false</td>
</tr>
<tr>
<td style="text-align:center">qrcv_customScanLineDrawable</td>
<td style="text-align:center">扫描线的图片资源「默认的扫描线图片样式不能满足你的需求时使用，设置该属性后 qrcv_isShowDefaultScanLineDrawable、qrcv_scanLineSize、qrcv_scanLineColor 将失效」</td>
<td style="text-align:center">null</td>
</tr>
<tr>
<td style="text-align:center">qrcv_borderSize</td>
<td style="text-align:center">扫描边框的宽度</td>
<td style="text-align:center">1dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_borderColor</td>
<td style="text-align:center">扫描边框的颜色</td>
<td style="text-align:center">@android:color/white</td>
</tr>
<tr>
<td style="text-align:center">qrcv_animTime</td>
<td style="text-align:center">扫描线从顶部移动到底部的动画时间「单位为毫秒」</td>
<td style="text-align:center">1000</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isCenterVertical</td>
<td style="text-align:center">扫描框是否垂直居中，该属性为true时会忽略 qrcv_topOffset 属性</td>
<td style="text-align:center">false</td>
</tr>
<tr>
<td style="text-align:center">qrcv_toolbarHeight</td>
<td style="text-align:center">Toolbar 的高度，通过该属性来修正由 Toolbar 导致扫描框在垂直方向上的偏差</td>
<td style="text-align:center">0dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isBarcode</td>
<td style="text-align:center">是否是扫条形码</td>
<td style="text-align:center">false</td>
</tr>
<tr>
<td style="text-align:center">qrcv_tipText</td>
<td style="text-align:center">提示文案</td>
<td style="text-align:center">null</td>
</tr>
<tr>
<td style="text-align:center">qrcv_tipTextSize</td>
<td style="text-align:center">提示文案字体大小</td>
<td style="text-align:center">14sp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_tipTextColor</td>
<td style="text-align:center">提示文案颜色</td>
<td style="text-align:center">@android:color/white</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isTipTextBelowRect</td>
<td style="text-align:center">提示文案是否在扫描框的底部</td>
<td style="text-align:center">false</td>
</tr>
<tr>
<td style="text-align:center">qrcv_tipTextMargin</td>
<td style="text-align:center">提示文案与扫描框之间的间距</td>
<td style="text-align:center">20dp</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isShowTipTextAsSingleLine</td>
<td style="text-align:center">是否把提示文案作为单行显示</td>
<td style="text-align:center">false</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isShowTipBackground</td>
<td style="text-align:center">是否显示提示文案的背景</td>
<td style="text-align:center">false</td>
</tr>
<tr>
<td style="text-align:center">qrcv_tipBackgroundColor</td>
<td style="text-align:center">提示文案的背景色</td>
<td style="text-align:center">#22000000</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isScanLineReverse</td>
<td style="text-align:center">扫描线是否来回移动</td>
<td style="text-align:center">true</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isShowDefaultGridScanLineDrawable</td>
<td style="text-align:center">是否显示默认的网格图片扫描线</td>
<td style="text-align:center">false</td>
</tr>
<tr>
<td style="text-align:center">qrcv_customGridScanLineDrawable</td>
<td style="text-align:center">扫描线的网格图片资源</td>
<td style="text-align:center">null</td>
</tr>
<tr>
<td style="text-align:center">qrcv_isOnlyDecodeScanBoxArea</td>
<td style="text-align:center">是否只识别扫描框区域的二维码</td>
<td style="text-align:center">false</td>
</tr>
</tbody>
</table>
<h4 id="第二步：获取控件，并实现QRCodeView-Delegate接口"><a href="#第二步：获取控件，并实现QRCodeView-Delegate接口" class="headerlink" title="第二步：获取控件，并实现QRCodeView.Delegate接口"></a>第二步：获取控件，并实现QRCodeView.Delegate接口</h4><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">QRCodeView mQRCodeView = (ZBarView) findViewById(R.id.zbarview);</span><br><span class="line">mQRCodeView.setDelegate(this);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">@Override</span><br><span class="line">  public void onScanQRCodeSuccess(String result) &#123;</span><br><span class="line">    vibrate();</span><br><span class="line">    Toast.makeText(this,result,Toast.LENGTH_SHORT).show();</span><br><span class="line">    mQRCodeView.startSpot();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  @Override</span><br><span class="line">  public void onScanQRCodeOpenCameraError() &#123;</span><br><span class="line">    Toast.makeText(this,&quot;错误&quot;,Toast.LENGTH_SHORT).show();</span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure></div>
<h4 id="第四步：实现onStart，onStop，onDestroy方法"><a href="#第四步：实现onStart，onStop，onDestroy方法" class="headerlink" title="第四步：实现onStart，onStop，onDestroy方法"></a>第四步：实现onStart，onStop，onDestroy方法</h4><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line">@Override</span><br><span class="line">  protected void onStart() &#123;</span><br><span class="line">    super.onStart();</span><br><span class="line">    mQRCodeView.startCamera();//打开相机</span><br><span class="line">    mQRCodeView.showScanRect();//显示扫描框</span><br><span class="line">    mQRCodeView.startSpot();//开始识别二维码</span><br><span class="line">    //mQRCodeView.openFlashlight();//开灯</span><br><span class="line">    //mQRCodeView.closeFlashlight();//关灯</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  @Override</span><br><span class="line">  protected void onStop() &#123;</span><br><span class="line">    mQRCodeView.stopCamera();</span><br><span class="line">    super.onStop();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  @Override</span><br><span class="line">  protected void onDestroy() &#123;</span><br><span class="line">    mQRCodeView.onDestroy();</span><br><span class="line">    super.onDestroy();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  private void vibrate() &#123;</span><br><span class="line">    Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);</span><br><span class="line">    vibrator.vibrate(200);</span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure></div>
<h4 id="第五步：添加权限"><a href="#第五步：添加权限" class="headerlink" title="第五步：添加权限"></a>第五步：添加权限</h4><div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">&lt;uses-permission android:name=&quot;android.permission.CAMERA&quot;/&gt;</span><br><span class="line">&lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot;/&gt;</span><br></pre></td></tr></table></figure></div>
<p>经过上面5步，扫描功能就已经出来了，Zbar扫描比Zxing快，Zbar是基于C实现的，Zxing是基于C++。有个问题就是Zbar无法生成二维码，如果你是集成的BGA的Zxing可以生成二维码。Zxing生成二维码的方式如下：</p>
<p><strong><em>耗时操作，新开线程</em></strong></p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">//中文</span><br><span class="line">Bitmap bitmap = QRCodeEncoder.syncEncodeQRCode(&quot;海晨忆&quot;, BGAQRCodeUtil.dp2px(this, 150));</span><br><span class="line"></span><br><span class="line">//带logo</span><br><span class="line">Bitmap logoBitmap = BitmapFactory.decodeResource(TestGeneratectivity.this.getResources(), R.mipmap.logo);</span><br><span class="line">QRCodeEncoder.syncEncodeQRCode(&quot;海晨忆&quot;, BGAQRCodeUtil.dp2px(TestGeneratectivity.this, 150), Color.parseColor(&quot;#ff0000&quot;), logoBitmap);</span><br></pre></td></tr></table></figure></div>
<p><strong><em>解析图片二维码</em></strong></p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">//mEnglishLogoIv：显示二维码的控件</span><br><span class="line">mEnglishLogoIv.setDrawingCacheEnabled(true);</span><br><span class="line">Bitmap bitmap = mEnglishLogoIv.getDrawingCache();</span><br><span class="line"></span><br><span class="line">//返回二维码图片里的内容 或 null</span><br><span class="line">String result = QRCodeDecoder.syncDecodeQRCode(bitmap);</span><br><span class="line">String result = QRCodeDecoder.syncDecodeQRCode(picturePath);</span><br></pre></td></tr></table></figure></div>

      
    </div>
    
      <footer class="article-footer">
        完
      </footer>
    
  </div>
  
    
<nav id="article-nav">
  <div class="article-nav-block">
    
      <a href="/2018/03/06/EventBus源码解析-一-——获取EventBus对象/" id="article-nav-newer" class="article-nav-link-wrap">
        <strong class="article-nav-caption"></strong>
        <div class="article-nav-title">
          
            EventBus源码解析(一)——获取EventBus对象
          
        </div>
      </a>
    
  </div>
  <div class="article-nav-block">
    
      <a href="/2018/03/05/Android-WIFI功能——WifiManager/" id="article-nav-older" class="article-nav-link-wrap">
        <div class="article-nav-title">Android WIFI功能——WifiManager</div>
        <strong class="article-nav-caption"></strong>
      </a>
    
  </div>
</nav>

    
  
  
</article>
</section>
        <aside id="sidebar">
  
    <div class="widget-box">
  <div class="avatar-box avatar-item">
    <img class="avatar" src="/uploads/artistic_image/head.jpg" title="头像来自网络"></img>
    <h3 class="avatar-name">
      
        海晨忆
      
    </h3>
    <p class="avatar-slogan">
      先谋生，再谋爱。人间值得，未来可期。
    </p>
  </div>
</div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Android-Socket/">Android -Socket</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-加密算法/">Android -加密算法</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-常用功能/">Android -常用功能</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-框架/">Android -框架</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-源码解析/">Android -源码解析</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-自定义view/">Android -自定义view</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-设计模式/">Android -设计模式</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/JAVA-并发/">JAVA -并发</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java-SpringBoot/">Java -SpringBoot</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Tomcat/">Tomcat</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/kotlin/">kotlin</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据库-JDBC/">数据库 -JDBC</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据库-MySQL/">数据库 -MySQL</a></li></ul>
    </div>
  </div>


  
    

  
    
  
    
  <div class="widget-box">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/11/">November 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/10/">October 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/09/">September 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">August 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/">July 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">June 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/10/">October 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/05/">May 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">March 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">February 2018</a></li></ul>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2021/07/27/JAVA—公平锁，非公平锁，悲观锁，乐观锁，死锁/">JAVA—公平锁，非公平锁，悲观锁，乐观锁，死锁</a>
          </li>
        
          <li>
            <a href="/2021/07/19/JAVA—线程同步器AQS/">JAVA—线程同步器AQS</a>
          </li>
        
          <li>
            <a href="/2021/07/07/Android模拟点击/">Android模拟点击</a>
          </li>
        
          <li>
            <a href="/2019/11/27/SpringBoot系列-消息-RabbitMQ-（二十）/">SpringBoot系列-消息(RabbitMQ)（二十）</a>
          </li>
        
          <li>
            <a href="/2019/11/13/SpringBoot系列-Docker（十九）/">SpringBoot系列-Docker（十九）</a>
          </li>
        
      </ul>
    </div>
  </div>

  
      <div class="widget-box">
    <h3 class="widget-title">友情链接</h3>
    <div class="widget">
      
        <a class="hrf" style="display: block;" href="https://github.com/haichenyi" title target='_blank'
        >Github</a>
      
        <a class="hrf" style="display: block;" href="https://www.jianshu.com/u/6077ee440c37" title target='_blank'
        >简书</a>
      
        <a class="hrf" style="display: block;" href="https://blog.csdn.net/qq_27634797" title target='_blank'
        >CSDN</a>
      
    </div>
  </div>

  
</aside>
      </div>
      <footer id="footer">
  <div class="foot-box footers global-width">
    &copy;2017-2021 海晨忆 &nbsp;&nbsp;
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span id="busuanzi_container_site_pv">阁下是第<span id="busuanzi_value_site_pv"></span>个访客</span>
  </div>
</footer>
      <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
if (!window.jQuery) {
var script = document.createElement('script');
script.src = "/js/jquery-2.0.3.min.js";
document.body.write(script);
}
</script>

  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>



    </div>
    <nav id="mobile-nav" class="mobile-nav-box">
  <div class="mobile-nav-img mobile-nav-top"></div>
  
    <a href="/" class="mobile-nav-link">首页</a>
  
    <a href="/archives" class="mobile-nav-link">归档</a>
  
    <a href="/about" class="mobile-nav-link">简历</a>
  
  <div class="mobile-nav-img  mobile-nav-bottom"></div>
</nav>    
  </div>
</body>
</html>